//闪屏页
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:tvlives/route/Application.dart';
import 'package:tvlives/route/Routes.dart';

class SplashPage extends StatefulWidget{
  final String title;

  SplashPage({Key key,this.title}):super(key:key);

  @override
  State<StatefulWidget> createState() {
    return _SplashPageState();
  }
}

class _SplashPageState extends State<SplashPage>{



  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      body: Container(
        child: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Icon(
                Icons.live_tv,
                size:150.0,
                color:Colors.grey
              ),
              Text(
                "今天怎么样了？",
                style: TextStyle(color: Colors.grey),
              ),
              Text(
                "Live Tv",
                    style:TextStyle(color: Colors.grey)
              )
            ],
          ),
        ),
      ),
    );
  }

  @override
  void initState() {
      super.initState();
      startHome();
  }
  startHome() async {
    await Future.delayed(const Duration(milliseconds: 1000), () {
      Application.router.navigateTo(context, Routes.home, replace: true);
    });
  }
}